<?php
namespace app\home\controller;
use \think\Db;


class Ajax extends \think\Controller
{
    public function online_exh(){
    	
    	input('category_id') and $categoryId = input('category_id') or $categoryId = 1;
    	$where1 = 'status = 1 and category_id = '.intval($categoryId);
    	$goodsArr = Db('baode_goods')->where($where1)->order('is_hot asc ,id desc')->limit(8)->select();
    	
        echo $this->allFetch(get_defined_vars());die;
    }
    
    
    public function orderLog(){
    	 
    	input('category_id') and $categoryId = input('category_id') or $categoryId = 1;
    	$where1 = 'status = 2 and category_id = '.intval($categoryId);
    	$goodsArr = Db('baode_goods')->where($where1)->order('is_hot asc ,id desc')->limit(8)->select();
    	 
    	echo $this->allFetch(get_defined_vars());die;
    }
    
}
